<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%     
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";    
pageContext.setAttribute("basePath",basePath);     
%> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang='zh-CN' xml:lang='zh-CN' xmlns='http://www.w3.org/1999/xhtml'>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <link rel="shortcut icon" type="image/x-icon" href="/img/favicon.ico" />
  <base href="https://www.oschina.net"/>
  <title>加入开源中国 - 开源中国社区</title>
        <link rel="stylesheet" href="/css/channel.css?date=20130520" type="text/css" media="screen" />
  <link rel="stylesheet" type="text/css" href="/js/2011/fancybox/jquery.fancybox-1.3.4.css" media="screen" />
  <link rel="alternate" type="application/rss+xml" title="最新开源项目" href="http://www.oschina.net/project/rss" />
  <link rel="alternate" type="application/rss+xml" title="最新开源资讯" href="http://www.oschina.net/news/rss" />
  <link rel="alternate" type="application/rss+xml" title="最新问题列表" href="http://www.oschina.net/question/rss" />
  <link rel="alternate" type="application/rss+xml" title="最新翻译列表" href="http://www.oschina.net/translate/rss" />
  <link rel="alternate" type="application/rss+xml" title="最新博客列表" href="http://www.oschina.net/blog/rss" />
  <link rel="alternate" type="application/rss+xml" title="最新代码分享列表" href="http://www.oschina.net/code/rss" />
  <link rel="alternate" type="application/rss+xml" title="开源中国 - 源码列表" href="http://www.oschina.net/code/source_rss" />
  <script type="text/javascript" src="/js/2012/jquery-1.7.1.min.js"></script>
  <script type="text/javascript" src="/js/2012/jquery.form.js"></script>
  <script type="text/javascript" src="/js/2011/fancybox/jquery.fancybox-fixed.js?20130503"></script>
      <script type="text/javascript">
  	g_user = {
	id:0,
	name:'',
	login:false};  </script>
    <script type="text/javascript" src="/js/2011/oschina.js?ver=20121007"></script>
  <script type="text/javascript" src="/js/utils.js"></script>
  <script type="text/javascript" src="/js/channel.js?2013060501"></script>
    </head>
<body>
<div id='OSC_NavTop'>
	<div class="wp998">
        <div id="OSC_Channels">
        	<ul>
        	<li class="item"><a href="http://www.oschina.net/" class='home'>首页</a></li>        	<li class="item control_select"><a href="http://www.oschina.net/project" class='project'>开源项目</a>
				<ul class="cs_content">					
                	                	<li><a href="http://www.oschina.net/project/lang/19/java">Java 开源软件</a></li>
                	<li><a href="http://www.oschina.net/project/lang/194/csharp">C# 开源软件</a></li>
                	<li><a href="http://www.oschina.net/project/lang/22/php">PHP 开源软件</a></li>
                	<li><a href="http://www.oschina.net/project/lang/21/c">C/C++ 开源软件</a></li>
                	<li><a href="http://www.oschina.net/project/lang/26/ruby">Ruby 开源软件</a></li>
                	<li><a href="http://www.oschina.net/project/lang/25/python">Python 开源软件</a></li>
                	<li><a href="http://www.oschina.net/project/lang/358/go">Go开源软件</a></li>
                	<li><a href="http://www.oschina.net/project/lang/28/javascript">JS开源软件</a></li>
				</ul>
			</li>
        	<li class="item control_select">
				<a href="http://www.oschina.net/question" class='question'>讨论区</a>				
				<ul class="cs_content">					
                	<li><a href="http://www.oschina.net/question?catalog=1"> 技术问答 &raquo; </a></li>
                	<li><a href="http://www.oschina.net/question?catalog=2"> 技术分享 &raquo; </a></li>
                	<li><a href="http://www.oschina.net/question?catalog=3"> IT大杂烩 &raquo; </a></li>
                	<li><a href="http://www.oschina.net/question?catalog=100"> 职业生涯 &raquo; </a></li>
                	<li><a href="http://www.oschina.net/question?catalog=4"> 站务/建议 &raquo; </a></li>
                	<li><a href="http://www.oschina.net/alipay"> 支付宝专区 &raquo; </a></li>
                	<li><a href="http://www.oschina.net/hardware"> 开源硬件专区 &raquo; </a></li>
				</ul>
			</li>
        	<li class="item"><a href="http://www.oschina.net/code/list" class='code'>代码</a></li>
        	        	<li class="item"><a href="http://www.oschina.net/blog" class='blog'>博客</a></li>
        	<li class="item"><a href="http://www.oschina.net/translate" class='tran'>翻译</a></li>
            <li class="item"><a href="http://www.oschina.net/news" class='news'>资讯</a></li>
        	<li class="item control_select">
				<a href="http://www.oschina.net/android" class='mobile'>移动开发</a>
				<ul class="cs_content cs_mobile">
                	<li class="android_"><a href="http://www.oschina.net/android">Android开发专区</a></li>
                	<li class="ios_"><a href="http://www.oschina.net/ios/home">iOS开发专区</a></li>
                	<li class="ios_"><a href="http://www.oschina.net/ios/codingList">iOS代码库</a></li>
                	<li class="wp7_"><a href="http://www.oschina.net/wp7">WP7开发专区</a></li>
				</ul>
			</li>
        	<li class="item t_job"><a href="http://www.oschina.net/job" class='job'>招聘</a></li>
			            <li class="item control_select">
                <a href="http://city.oschina.net/" id="MyCities" title="城市圈">城市圈</a>
							</li>
        	</ul>
        </div>
		<div id="OSC_Userbar">
                		    		当前访客身份：游客 [ <a href="http://www.oschina.net/home/login?goto_page=https%3A%2F%2Fwww.oschina.net%2Fhome%2Freg">登录</a> | <a href="http://www.oschina.net/home/reg">加入开源中国</a> ]
    				</div>
		<div class='clear'></div>
	</div>
</div>
<div id='OSC_Banner'><div class="wp998"><a href='http://www.oschina.net/' class='Logo' title='OSChina 开源中国'>开源中国</a>
<h1>会员系统</h1>
<form action='http://www.oschina.net/search' class='search'>
	<input type='hidden' name='scope' value='project'/>
	<input id='channel_q' type='text' name='q' value='' placeholder='资讯、软件、分享、代码、博客' class='TXT'/>
    <button type='submit' class='BTN'>搜 索</button>
</form>
<div class='clear'></div></div></div>
<div id="OSC_Screen">
	<div id="OSC_Content" class='CenterDiv'>

<style>/* 登录注册等相关页面的样式 */

#OSC_Footer {border:0;}
#user_page {
	font-size:10pt;
	overflow:hidden;
	background:#fff;
	border:1px solid #ddd;
	padding:20px;
}
#user_page #form_user {float:left;width:650px;}
#user_page #form_user h2 {font-size:16pt;font-weight:normal;color:#333;border-bottom:2px solid #ddd;margin:0 50px 0 0;padding-bottom:10px;}

#OSChinaLoginTip {margin:40px 0 20px 0;color:#060;}
#OSChinaLoginTip ul {overflow:hidden;margin:15px 0 0 0;}
#OSChinaLoginTip ul li {float:left; width:100px;}
#OSChinaLoginTip ul li#openid_gmail img {margin-top:8px;}
#OSChinaLoginTip ul li#openid_yahoo img {margin-top:15px;}
#OSChinaLoginTip ul li#openid_msn img {}
#OSChinaLoginTip ul li#openid_github img {margin-top:8px;}
#OSChinaLoginTip ul li#openid_sina img {margin-top:8px;}

#user_page #login_tip {float:right;width:300px;font-size:10.5pt;color:#666;}
#user_page #login_tip h3 {margin:30px 0 10px 0;font-size:11pt;}
#user_page #login_tip ol {
	font-size:10pt;
	padding:10px 5px;
	list-style-type: decimal;
	list-style-position: inside;
}

#user_page form th {font-size:10.5pt;text-align:right;padding:10px;}
#user_page form td {vertical-align:middle;}
#user_page form input.TEXT {font-size:16px;padding:3px;border:1px solid #ccc;}
#user_page form input.TEXT:focus {border:1px solid #40AA53;outline: none;}
#user_page form select {font-size:16px;padding:3px;}
#user_page form input.BUTTON {
	font-size:14px;
	padding:0 5px;
	height:30px;
}
#user_page form input.SUBMIT {font-weight:bold;}
</style>
<div id="user_page">
<form id="form_user" action="<%=basePath%>test/save" method="POST" style="float:left; width:620px;">
    <h2>加入开源中国</h2>	
	<div id="OSChinaLoginTip" style='margin-top:10px;'>
	支持以下几种自动注册方法（无需手工激活帐号，请点击以下图标进入）：
	<ul>
		<li id='openid_sina'><a href="http://www.oschina.net/action/openid/before_bind?op=sina" title="使用新浪微博帐号登录"><img src='/img/weibo.gif' alt='weibo'/></a></li>
		<li id='openid_github'><a href="http://www.oschina.net/action/openid/before_bind?op=github" title="使用GitHub帐号登录"><img src='/img/github_logo.gif' alt='github'/></a></li>
		<li id='openid_yahoo'><a href="http://www.oschina.net/action/openid/before_bind?op=yahoo" title="使用Yahoo帐号登录"><img src='/img/yahoo.gif' alt='yahoo'/></a></li>
		<li id='openid_msn'><a href="http://www.oschina.net/action/openid/before_bind?op=liveid" title="使用MSN帐号登录"><img src='/img/msn-live.gif' alt='msn'/></a></li>    	
		<li id='openid_gmail'><a href="http://www.oschina.net/action/openid/before_bind?op=gmail" title="使用Gmail帐号登录"><img src='/img/google_25wht.gif' alt='gmail'/></a></li> 
    </ul>
	</div>	
    
	<table cellspacing='0' cellpadding='0'>
    	<tr id='tr_email'>
    		<th nowrap>电子邮箱：</th>
    		<td>
				<input type='text' name='email' id='f_email' value='' class='TEXT' style='width:200px;'/>
				<span id='email_tip'></span>
			</td>    			
    	</tr>
    	<tr>
			<th></th>
			<td>
    		<ol style="border:1px solid #40AA53;padding:5px;color:#40AA53;list-style-position:inside;line-height:22px;list-style-type:decimal;margin:0 0 10px 0;">
								<li style='color:#A00;'>请填写真实邮箱，用于激活您的帐号；</li>
				    			<li>包括 Gmail 在内很多邮件服务商会把 oschina 发送的邮件识别为垃圾邮件；</li>
				<li>如果您使用<span style='color:#A00;'>163邮箱</span>，那么邮件可能在您的订阅邮件列表中</li>
                <li>如果您没有收到 oschina 发送的邮件，请注意查看您邮箱中的垃圾邮件；</li>
                <li>请将来自 oschina 的邮件设置成不是垃圾邮件，以便接受本站邮件；</li>
                <li>如果您忘记登录密码，也可以通过此邮箱进行密码重置；</li>
			</ol>
			</td>
    	</tr>
    	<tr>
    		<th>姓名：</th>		
    		<td><input type='text' name='name' id='f_name' maxlength='20' class='TEXT' style='width:150px;'/>
				<span id='name_msg'>不能超过10个字</span>
			</td>
    	</tr>
    	<tr>
    		<th>登录密码：</th>
    		<td><input type='password' name='pwd' id='f_pwd' class='TEXT' style='width:150px;'/>
				<span id='password_msg'>至少四位</span>		
			</td>    		
    	</tr>
    	<tr>
    		<th>密码确认：</th>		
    		<td><input type='password' name='pwd2' id='f_pwd2' class='TEXT' style='width:150px;'/></td>
    	</tr>
    	<tr id='tr_gender'>
        	<th>性别：</th>		
    		<td>
				<input type='radio' name='gender' value='1' id='gender_1'/><label for='gender_1'>男</label>&nbsp;&nbsp;&nbsp;
				<input type='radio' name='gender' value='2' id='gender_2'/><label for='gender_2'>女</label>
				<span class='nodisp'>请选择性别</span>
			</td>	
        </tr>
    	<tr id='tr_area'>
    		<th>居住地区：</th>		
    		<td><select onchange="showcity(this.value, document.getElementById('userCity'));" name="province" id="userProvince">
	<option value=''>--请选择省份--</option>
	<option value=北京>北京</option> 
	<option value=上海>上海</option> 
	<option value=广东>广东</option> 
	<option value=江苏>江苏</option> 
	<option value=浙江>浙江</option> 
	<option value=重庆>重庆</option> 
	<option value=安徽>安徽</option> 
	<option value=福建>福建</option> 
	<option value=甘肃>甘肃</option> 
	<option value=广西>广西</option> 
	<option value=贵州>贵州</option> 
	<option value=海南>海南</option> 
	<option value=河北>河北</option> 
	<option value=黑龙江>黑龙江</option> 
	<option value=河南>河南</option> 
	<option value=湖北>湖北</option> 
	<option value=湖南>湖南</option> 
	<option value=江西>江西</option> 
	<option value=吉林>吉林</option> 
	<option value=辽宁>辽宁</option> 
	<option value=内蒙古>内蒙古</option> 
	<option value=宁夏>宁夏</option> 
	<option value=青海>青海</option> 
	<option value=山东>山东</option> 
	<option value=山西>山西</option> 
	<option value=陕西>陕西</option> 
	<option value=四川>四川</option> 
	<option value=天津>天津</option> 
	<option value=新疆>新疆</option> 
	<option value=西藏>西藏</option> 
	<option value=云南>云南</option> 
	<option value=香港>香港特别行政区</option> 
	<option value=澳门>澳门特别行政区</option>
	<option value=台湾>台湾</option> 
	<option value=海外>海外</option>
</select>
<select name="city" id="userCity"></select>
<script src="/js/getcity.js"></script><span class='nodisp'>请选择您所在的地区</span></td>
    	</tr>
    	<tr>
    		<th>验证码：</th>		
    		<td><input type='text' id='f_vcode' name='verifyCode' size='6' class='TEXT'/>
			<span><a href="javascript:_rvi()">换另外一个图</a></span>
			</td>
    	</tr>
		<tr>
    		<th>&nbsp;</th>		
			<td>
			<img id="img_vcode" align="absmiddle" alt="..." src="/action/user/captcha" style="border:2px solid #ccc;"/>
            <script language='javascript'>function _rvi(){document.getElementById('img_vcode').src = '/action/user/captcha?t='+Math.random(1000);}</script>
			</td>
		</tr>
    	<tr class='buttons'>
    		<th>&nbsp;</th>		
			<td style='padding:20px 0;'>
    		<input type='submit' value=' 注册新用户 ' class='BUTTON SUBMIT'/> <span id='error_msg' class='error_msg' style='display:none'></span>
			<br/><br/>
			<span style='color:#40AA53;'>OSCHINA倡导真实的技术交流环境，请注册成功后上传真实头像，<a href="http://www.oschina.net/question/12_7806" target="_blank">了解详情&raquo;</a></span>
			</td>
    	</tr>
	</table>
</form>
<div id="login_tip">
	已有帐号？ <a href='/home/login'>直接登录</a>
	<h3>为什么要注册？</h3>
	<ol>
		<li>发布开源软件、新闻和博客</li>
		<li>参与开源软件/新闻的讨论和评论</li>
		<li>和别人分享软件使用心得</li>
		<li>随时得到软件最新更新消息</li>
		<li>认识更多开源爱好者</li>
	</ol>
	<h3>为什么总提示验证码错误？</h3>
	<ol>
		<li>首先请确定浏览器已经启用Cookie</li>
		<li>实在不行，邮件给我们 oschina.net AT gmail.com</li>
	</ol>
</div>
<div class='clear'></div>
</div>
<script src="/js/sha1.js"></script>
<script type='text/javascript'>
<!--
var pwd="";
var pwd2="";
$('#form_user').bind('form-pre-serialize', function(event,form,options,veto){
	pwd=$('#f_pwd').val();
	pwd2=$('#f_pwd2').val();
	$('#f_pwd').val(CryptoJS.SHA1($('#f_pwd').val()));
	$('#f_pwd2').val(CryptoJS.SHA1($('#f_pwd2').val()));
});
$('#form_user').ajaxForm({
    beforeSubmit: function(a,f,o) {
		if($('#f_email').val().length == 0){
			$('#f_pwd').val(pwd);
			$('#f_pwd2').val(pwd2);
			$('#f_email').focus();
			$('#error_msg').html("邮箱地址必须填写");
			$('#error_msg').show("fast");
			return false;
		}
		/*
		else{
			var acc = $('#f_email').val().toLowerCase();			
			if(acc.indexOf('@qq.com')>0 || acc.indexOf('@foxmail.com')>0){
				$('#error_msg').html("暂时不支持使用QQ和Foxmail邮箱进行注册");
				$('#error_msg').show("fast");
    			$('#f_pwd').val(pwd);
    			$('#f_pwd2').val(pwd2);
				return false;
			}
		}*/
		if($('#f_name').val().length == 0){
			$('#f_name').focus();
			$('#error_msg').html("姓名必须填写");
			$('#error_msg').show("fast");
			$('#f_pwd').val(pwd);
			$('#f_pwd2').val(pwd2);
			return false;
		}
		if($('#f_pwd').val().length == 0 || $('#f_pwd').val() != $('#f_pwd2').val()){
			$('#f_pwd').val(pwd);
			$('#f_pwd2').val(pwd2);
			$('#f_pwd').focus();
			$('#error_msg').html("两次密码必须填写，且要匹配");
			$('#error_msg').show("fast");
			return false;
		}
		var notify = $("input[name=gender]:checked").val();
		if(!notify){
			$('#f_pwd').val(pwd);
			$('#f_pwd2').val(pwd2);
			$('#tr_gender').addClass('hl');
			return false;
		}
		if($('#f_vcode').val().length == 0){
			$('#f_pwd').val(pwd);
			$('#f_pwd2').val(pwd2);
			$('#f_vcode').focus();
			$('#error_msg').html("验证码必须填写");
			$('#error_msg').show("fast");
			return false;
		}
    },
    success: function(html) {
    		alert(html);
    	if(html.length > 0){
			$('#f_pwd').val(pwd);
			$('#f_pwd2').val(pwd2);
    		$('#error_msg').hide();
    		$('#error_msg').html(html);
    		$('#error_msg').show("fast");
    	}else{
    		//location.href="http://www.oschina.net/home/regok?email=" + $('#f_email').val();
    	}
    }
});
//-->
</script><div class='clear'></div></div>
	<div id="OSC_Footer" class='CenterDiv'><style>
.oscapp {text-align:left; width:220px;}
.oscapp span {float:left;width:140px;}
.oscapp a {float:left;text-indent:-9999em;width:16px;margin-left:8px;}
.oscapp a.android {background:url('/img/android.gif') no-repeat left center;}
.oscapp a.iphone {background:url('/img/iphone.gif') no-repeat left center;}
.oscapp a.wp7 {background:url('/img/wp7.gif') no-repeat left center;}
</style>
<table width='100%'><tr>
<td align='left'>&copy; 开源中国(OsChina.NET) | <a href="http://www.oschina.net/home/about">关于我们</a> | <a href="mailto:oschina.net@gmail.com">广告联系</a> | <a href="http://weibo.com/oschina2010" target="_blank">@新浪微博</a> | <a href="http://m.oschina.net/">开源中国手机版</a> | <a href='http://www.miitbeian.gov.cn/' target='_blank' style='color:#737573;text-decoration:none;'>粤ICP备12009483号-3</a></td>
<td class='oscapp'>
	<span>开源中国手机客户端：</span>
	<a href="http://www.oschina.net/app" class='android' title='Android客户端'>Android</a>
	<a href="http://www.oschina.net/app" class='iphone' title='iPhone 客户端'>iPhone</a>
	<a href="http://www.oschina.net/app" class='wp7' title='Windows Phone 客户端'>WP7</a>
</td>
</tr>
</table>
<script type='text/javascript'>
<!--
if (top.location != self.location)top.location=self.location;
//-->
</script></div>
</div>
</body>
</html>
<!-- Generated by OsChina.NET (init:0[ms],page:12[ms],ip:111.174.154.58) -->